
<?php include("header.php"); ?>

<script type="text/javascript">

var arrParams = new Array();
var cur_id = "";

/*
* Validate before updating
* param: cur_object: ID of object contains the value should be checked
* param: param_type: PARAM_TYPE_DATETIME or PARAM_TYPE_NUMBER
*
*/
function validate(cur_object, param_type, para_name)
{
	if (cur_object.value.length > "<?php echo MAX_LENGTH_NAME; ?>") {
		showErrorBubble(cur_object, '<?php echo _MSG_VALUE_LENGTH_OVER_255; ?>');
		return false;
	}

	// check whether or not the object's value is empty
	if(para_name != 'KEYWORD_BLACK_LIST_DEAL' && para_name != 'KEYWORD_GREY_LIST_DEAL' && isEmptyTextBox(cur_object, "<?php echo _LB_MUST_NOT_BE_EMPTY; ?>")) {
		return false;
	}

	// check validation belong to param_type: DATETIME or NUMBER
	if(param_type == <?php echo PARAM_TYPE_DATETIME; ?>){
		// check validation for DATETIME
		if(!isValidDate(cur_object.value, "DMY")){
			// show bubble message
			showErrorBubble(cur_object, '<?php echo _LB_DATE_INVALID; ?>');
			return false;
		}
	}else if(param_type == <?php echo PARAM_TYPE_NUMBER; ?>){
		// check validation for NUMBER, equal or greater than 0
		if(!isPositiveWholeInteger(cur_object.value)){
			// show bubble message
			showErrorBubble(cur_object, '<?php echo _MSG_INVALID_NUMBER; ?>');
			return false;
		}
	}else if(param_type == <?php echo PARAM_TYPE_RATE_NUMBER; ?>){
		// check validation for NUMBER, equal or greater than 0
		if(!isNumeric(cur_object.value)){
			// show bubble message
			showErrorBubble(cur_object, '<?php echo _MSG_INVALID_NUMBER; ?>');
			return false;
		}
		if (!isValidDecimalNumber(cur_object.value))
		{
			showErrorBubble(cur_object, '<?php echo _MSG_INVALID_DECIMAL_NUMBER; ?>');
			return false;
		}
	}else if(param_type == <?php echo PARAM_TYPE_FLOAT_WITH_3_DECIMAL; ?>){

		if(!isNumeric(cur_object.value) || parseFloat(cur_object.value) <= 0){
			// show bubble message
			showErrorBubble(cur_object, '<?php echo _MSG_INVALID_NUMBER; ?>');
			return false;
		}
		if (!isValidDecimalNumber(cur_object.value, <?php echo MAX_DECIMAL_NUMBER_OF_TIMEOUT; ?>))
		{
			showErrorBubble(cur_object, '<?php echo str_replace("N", MAX_DECIMAL_NUMBER_OF_TIMEOUT, _MSG_INVALID_DOUBLE_NUMBER); ?>');
			return false;
		}
	}else if(param_type == <?php echo PARAM_TYPE_FLOAT_WITH_2_DECIMAL; ?>){

		if(!isNumeric(cur_object.value) || parseFloat(cur_object.value) <= 0){
			// show bubble message
			showErrorBubble(cur_object, '<?php echo _MSG_INVALID_NUMBER; ?>');
			return false;
		}
		if (!isValidDecimalNumber(cur_object.value, 2))
		{
			showErrorBubble(cur_object, '<?php echo str_replace("N", "2", _MSG_INVALID_DOUBLE_NUMBER); ?>');
			return false;
		}

	}else if(param_type == "<?php echo PARAM_TYPE_POSITIVE_NUMBER; ?>"){
		// check validation for NUMBER, greater than 0
		if(!isPositiveWholeInteger(cur_object.value) || cur_object.value <= 0){
			// show bubble message
			showErrorBubble(cur_object, '<?php echo _MSG_INVALID_NUMBER; ?>');
			return false;
		}
		if (para_name == 'LEVEL_OF_PRIORITY_OF_PUBLICATION')
		{
			if (cur_object.value > 99)
			{
				// show bubble message
				showErrorBubble(cur_object, '<?php echo _MSG_INVALID_NUMBER; ?>');
				return false;
			}
		}
	}else if(param_type == "<?php echo PARAM_TYPE_INTEGER_FROM_1_TO_99; ?>"){
		
		if (!isPositiveWholeInteger(cur_object.value) || cur_object.value <= 0 || cur_object.value >= 100) {
			showErrorBubble(cur_object, '<?php echo _MSG_VALUE_MUST_BE_INTEGER_FROM_1_TO_99; ?>');
			return false;
		}
	}else if(param_type == "<?php echo PARAM_TYPE_INTEGER_FROM_1_TO_999; ?>"){

		if (!isPositiveWholeInteger(cur_object.value) || cur_object.value <= 0 || cur_object.value >= 1000) {
			showErrorBubble(cur_object, '<?php echo _MSG_VALUE_MUST_BE_INTEGER_FROM_1_TO_999; ?>');
			return false;
		}
	}
	else if(para_name == 'APP_DEFAULT_LANGUAGE')
	{
		match = false;
		for(i = 0; i < authorized_languages.length && match == false; i++)
		{
			if(authorized_languages[i] == cur_object.value.toLowerCase())
			{
				match = true;
			   cur_object.value = cur_object.value.toLowerCase();
			}
		}

		if (match == false)
		{
			// show bubble message
			showErrorBubble(cur_object, '<?php echo _MSG_INVALID_LANGUAGE; ?>');
			return false;
		}
	}

	return true;
}

function showbox(id, type)
{
	var box = document.getElementById("box_"+id);
	var text = document.getElementById("text_"+id);
	var text_value = document.getElementById("value_"+id);
	if( cur_id != "" && cur_id != id){
		hidebox(cur_id);
	}

	cur_id = id;

	if (!checkParamIdInArray(cur_id)) {
		arrParams.push([cur_id, text_value.value]);
	}

	box.style.display = "none";
	text.style.display = "";
	if (type != null && type == '<?php echo PARAM_TYPE_DATETIME; ?>')
	{
		getDatePicker("value_" + id);
	}
    else if (type != null && type == '<?php echo PARAM_TYPE_TEXT_AREA_MANY_LINE; ?>')
	{
        document.getElementById('div_head_'+id).style.height= '100px';                
	}

}

function hidebox(id,type)
{
	var box = document.getElementById("box_"+id);
	var text = document.getElementById("text_"+id);
	var text_value = document.getElementById("value_"+id);

	if(cur_id == id){
		
		for (var i = 0; i < arrParams.length; i++) {

			if (arrParams[i][0] == id) {

				if (text_value.type == "checkbox") {
					if (arrParams[i][1] == "true")
						text_value.checked = true;
					else
						text_value.checked = false;
				}
				else
					text_value.value = arrParams[i][1];

				break;
			
			}

		}

	}

    document.getElementById('div_head_'+id).style.minHeight = '22px';
	document.getElementById('div_head_'+id).style.height = 'auto';
	
	box.style.display = "";
	text.style.display = "none";
}

function save_value(id, param_type, para_name)
{
	var val = document.getElementById("value_"+id);
	var args = new Array();
	
	// check validation
	if(validate(val, param_type, para_name)){
		
		if (param_type == <?php echo PARAM_TYPE_LIST_QUERY; ?> ||
			param_type == <?php echo PARAM_TYPE_LIST_WEBSERVICE; ?>) {
			args.push(id);
			
			if (para_name == 'TIMEZONE') {
				var arrVal = val.value.split('|');
				var label = document.getElementById("value_"+id + "_" + arrVal[0]);
				args.push(arrVal[1]);
			}
			else {
				args.push(val.value);
				var label = document.getElementById("value_"+id + "_" + val.value);
			}

			args.push(label.innerHTML);
			if (document.getElementById("box_value_"+id).innerHTML != val.value) {
				var x = callFunction('Parameter::saveValue',args);

				if (x == 1)
					document.getElementById("box_value_"+id).innerHTML = label.innerHTML;
				else if (x == -1)
					showErrorBubble(val, '<?php echo _MSG_UNABLE_SAVE_VALUE; ?>');
			}

			for (var i = 0; i < arrParams.length; i++) {
				
				if (arrParams[i][0] == id) {
					//if (obj.type = "select")
					if (param_type == <?php echo PARAM_TYPE_LIST_QUERY; ?>) {
						var obj = document.getElementById("value_"+id);
						arrParams[i] = [id, obj.value];
					}
					else
						arrParams[i] = [id, label.innerHTML];
					break;
				}
			}

			hidebox(id);
		}
		else {
			args.push(id);
			args.push(val.value);

			if (document.getElementById("box_value_"+id).innerHTML != val.value) {

				var x = callFunction('Parameter::saveValue',args);

				if (x == 1)
				{
					if (param_type == <?php echo PARAM_TYPE_STRING_SELECTION; ?>)
					{
						
					}
					else
					{
                        $('#box_value_'+id).html(val.value);
					}
				}
				else if (x == -1) {
					showErrorBubble(val, '<?php echo _MSG_UNABLE_SAVE_VALUE; ?>');
				}

			}

			for (var i = 0; i < arrParams.length; i++) {
				if (arrParams[i][0] == id) {
					arrParams[i] = [id, val.value];
				}
			}
			
			hidebox(id,param_type);
		}
	}
}

function switch_checkbox(id, obj)
{
	var text = document.getElementById("text_"+id);
	
	if (text.style.display == "none")
		text.style.display = "";
	else
		text.style.display = "none";

	var val = obj.checked;
	
	if (obj.checked)
		val = "false";
	else
		val = "true";

	if (!checkParamIdInArray(id)) {
		arrParams.push([id, val]);
	}

	if( cur_id != "" && cur_id != id){
		cur_obj = document.getElementById("value_"+cur_id);
		if (cur_obj.type != "")
		hidebox(cur_id);
	}

	cur_id = id;
}

function save_checkbox(id)
{
    var val = document.getElementById('value_'+id);
	var args = new Array();
	args.push(id);
	if (val.checked)
		args.push(1);
	else
		args.push(0);
	if (callFunction('Parameter::saveValue',args) == '1') {

        for (var i = 0; i < arrParams.length; i++) {
            if (arrParams[i][0] == id) {
                if (val.checked)
                    arrParams[i] = [id, "true"];
                else
                    arrParams[i] = [id, "false"];
                break;
            }
        }

        switch_checkbox(id, val);
    } else {
        alert('<?php echo _MSG_UNABLE_SAVE_VALUE; ?>');
    }
}

function checkParamIdInArray(id) {
	for (var i = 0; i <  arrParams.length; i++) {
		if (!arrParams[i][0])
			return false;

		if (arrParams[i][0] == id) {
			return true;
		}
	}

	return false;
}

</script>

	<div class="box_two_third">
		<div class="tab_small">
			<?php foreach ($tabs as $tab=>$group_name) {?>
					<?php if($category == $tab) { ?>
						<div class="box_head tab_active"><?php echo $group_name; ?></div>
					<?php } else { ?>
					<div id="auto_parameter_list_tab_<?php echo $tab; ?>" onclick="window.location='<?php echo APPLICATION_URL; ?>/parameter/index/<?php echo $tab; ?>'" class="tab_inactive hand">
							<?php echo $group_name; ?>
						</div>
					<?php } ?>
			<?php } ?>
		</div>
		<div class="box_content">
		    <?php if($param->countRows()) { ?>
            <?php while ($param->fetchNext()) { ?>
				<div class="object">
					<div id="div_head_<?php echo $param->id; ?>" class="head" style="min-height:22px">
						<div class="right">
							<?php if($param->type == PARAM_TYPE_BOOLEAN) { ?>
                            	<div id="box_<?php echo $param->id; ?>">
									<input onclick="switch_checkbox(<?php echo $param->id; ?>, this)" type="checkbox" name="value_<?php echo $param->id; ?>" id="value_<?php echo $param->id; ?>"
										<?php if($param->value) { ?>checked<?php } ?>
										<?php if($this->session->userdata('id_group') != ADMIN) { ?>
											disabled
										<?php } ?>
									/>
									<a id="text_<?php echo $param->id; ?>" style="display:none" href="javascript:save_checkbox(<?php echo $param->id; ?>)" >
										<?php echo HTMLInput::image_tooltip("", _IMAGE_DONE, IMAGE_SIZE_SMALL, _LB_VALIDATE); ?>
									</a>
								</div>
							<?php } else if ( $param->type == PARAM_TYPE_DATETIME) { ?>
								<div id="box_<?php echo $param->id; ?>">
									<div style="display:inline" id="box_value_<?php echo $param->id; ?>"><?php echo $param->value; ?></div>
									<?php if($this->session->userdata('id_group') == ADMIN) { ?>
										<a id="auto_parameter_list_edit_<?php echo $param->id; ?>" href="javascript:showbox(<?php echo $param->id; ?>, <?php echo $param->type; ?>)" >
											<?php echo HTMLInput::image_tooltip("", _IMAGE_MODIFIER, IMAGE_SIZE_SMALL, _LB_EDIT); ?>
										</a>
									<?php } ?>
								</div>

								<div id="text_<?php echo $param->id; ?>" style="display:none">
									<input id="value_<?php echo $param->id; ?>" name="value_<?php echo $param->id; ?>" value="<?php echo $param->value; ?>" type="text" size="10" />

									<a id="auto_parameter_list_validate_<?php echo $param->id; ?>" href="javascript:save_value(<?php echo $param->id; ?>,<?php echo $param->type; ?>);" >
										<?php echo HTMLInput::image_tooltip("", _IMAGE_DONE, IMAGE_SIZE_SMALL, _LB_VALIDATE); ?>
									</a>
									<a id="auto_parameter_list_cancel_<?php echo $param->id; ?>" href="javascript:hidebox(<?php echo $param->id; ?>);" >
										<?php echo HTMLInput::image_tooltip("", _IMAGE_SUPPRIMER, IMAGE_SIZE_SMALL, _LB_CANCEL); ?>
									</a>
								</div>
							<?php } else if ( $param->type == PARAM_TYPE_LIST_QUERY ||
									 $param->type == PARAM_TYPE_LIST_WEBSERVICE) { ?>
								<div id="box_<?php echo $param->id; ?>">
									<div style="display:inline" id="box_value_<?php echo $param->id; ?>"><?php echo $param->label; ?></div>
									<?php if($this->session->userdata('id_group') == ADMIN) { ?>
                                    	<a id="auto_parameter_list_edit_<?php echo $param->id; ?>" href="javascript:showbox(<?php echo $param->id; ?>)" >
											<?php echo HTMLInput::image_tooltip("", _IMAGE_MODIFIER, IMAGE_SIZE_SMALL, _LB_EDIT); ?>
										</a>
									<?php } ?>
								</div>

								<div id="text_<?php echo $param->id; ?>" style="display:none">
									<select id="value_<?php echo $param->id; ?>" name="value_<?php echo $param->id; ?>" <?php if($param->code == 'TIMEZONE') { ?> rel="tz"<?php } ?>>
										<option id="value_<?php echo $param->id; ?>_0" value="0"><?php echo _LB_CHOOSE; ?></option>
											<?php if(isset($references) && count($references) > 0) {?>
                                            <?php foreach($references[$param->id] as $id=>$v) {?>
											    <?php if($param->code == 'TIMEZONE') { ?>
												<option id="value_<?php echo $param->id; ?>_<?php echo $id; ?>" value="<?php echo $id; ?>|<?php echo $v['value']; ?>" <?php if($param->value == $v['value']) { ?>selected="selected"<?php } ?>><?php echo $v['label']; ?></option>
												<?php } else { ?>
												<option id="value_<?php echo $param->id; ?>_<?php echo $id; ?>" value="<?php echo $id; ?>" <?php if($param->value == $id) { ?>selected="selected"<?php } ?>><?php echo $v; ?></option>	
												<?php } ?>
											<?php } ?>
                                            <?php } ?>
									</select>

									<a id="auto_parameter_list_validate_<?php echo $param->id; ?>" href="javascript:save_value(<?php echo $param->id; ?>,<?php echo $param->type; ?>,'TIMEZONE');" >
										<?php echo HTMLInput::image_tooltip("", _IMAGE_DONE, IMAGE_SIZE_SMALL, _LB_VALIDATE); ?>
									</a>
									<a id="auto_parameter_list_cancel_<?php echo $param->id; ?>" href="javascript:hidebox(<?php echo $param->id; ?>);" >
										<?php echo HTMLInput::image_tooltip("", _IMAGE_SUPPRIMER, IMAGE_SIZE_SMALL, _LB_CANCEL); ?>
									</a>
								</div>
							<?php } else if ( $param->type == PARAM_TYPE_STRING_SELECTION) { ?>
									<div id="box_<?php echo $param->id; ?>" style="max-width:450px;">
										<div style="display:inline;max-width:425px;float:left;white-space: normal;word-wrap: break-word;" id="box_value_<?php echo $param->id; ?>">
											<?php if($param->value == TECHNICAL_DATA_BALANCE_BETWEEN_THE_TECHNICAL_DATA) { ?>
												<?php echo _LB_TECHNICAL_DATA_BALANCE_BETWEEN_THE_TECHNICAL_DATA; ?>
											<?php } else if ( $param->value == TECHNICAL_DATA_MANUAL_ENTRY) { ?>
												<?php echo _LB_TECHNICAL_DATA_MANUAL_ENTRY; ?>
											<?php } else { ?>
												<?php echo _LB_TECHNICAL_DATA_CALCULATED_BY_THE_SYSTEM; ?>
											<?php } ?>
										</div>
										<?php if($this->session->userdata('id_group') == ADMIN) { ?>
											<a id="auto_parameter_list_edit_<?php echo $param->id; ?>" href="javascript:showbox(<?php echo $param->id; ?>)" >
												<?php echo HTMLInput::image_tooltip("", _IMAGE_MODIFIER, IMAGE_SIZE_SMALL, _LB_EDIT); ?>
											</a>
										<?php } ?>
									</div>

									<div id="text_<?php echo $param->id; ?>" style="display:none">
										<select id="value_<?php echo $param->id; ?>" name="value_<?php echo $param->id; ?>" >
											<option value="<?php echo TECHNICAL_DATA_BALANCE_BETWEEN_THE_TECHNICAL_DATA; ?>" <?php if($param->value == TECHNICAL_DATA_BALANCE_BETWEEN_THE_TECHNICAL_DATA) { ?>selected<?php } ?> >
												<?php echo _LB_TECHNICAL_DATA_BALANCE_BETWEEN_THE_TECHNICAL_DATA; ?>
											</option>
											<option value="<?php echo TECHNICAL_DATA_MANUAL_ENTRY; ?>" <?php if($param->value == TECHNICAL_DATA_MANUAL_ENTRY) { ?>selected<?php } ?> >
												<?php echo _LB_TECHNICAL_DATA_MANUAL_ENTRY; ?>
											</option>
											<option value="<?php echo TECHNICAL_DATA_CALCULATED_BY_THE_SYSTEM; ?>" <?php if($param->value == TECHNICAL_DATA_CALCULATED_BY_THE_SYSTEM) { ?>selected<?php } ?>>
												<?php echo _LB_TECHNICAL_DATA_CALCULATED_BY_THE_SYSTEM; ?>
											</option>
										</select>
										<a id="auto_parameter_list_validate_<?php echo $param->id; ?>" href="javascript:save_value(<?php echo $param->id; ?>,<?php echo $param->type; ?>);" >
											<?php echo HTMLInput::image_tooltip("", _IMAGE_DONE, IMAGE_SIZE_SMALL, _LB_VALIDATE); ?>
										</a>
										<a id="auto_parameter_list_cancel_<?php echo $param->id; ?>" auto_parameter_list_cancel_<?php echo $param->id; ?> href="javascript:hidebox(<?php echo $param->id; ?>);" >
											<?php echo HTMLInput::image_tooltip("", _IMAGE_SUPPRIMER, IMAGE_SIZE_SMALL, _LB_CANCEL); ?>
										</a>
									</div>
							<?php } else if ( $param->type == PARAM_TYPE_RATE_NUMBER) { ?>
									<div id="box_<?php echo $param->id; ?>">
										<div style="display:inline" id="box_value_<?php echo $param->id; ?>">
											<?php if($param->type == PARAM_TYPE_RATE_NUMBER) { ?>
												<?php echo HTMLOutput::format_price($param->value); ?>
											<?php } else { ?>
												<?php echo $param->value; ?>
											<?php } ?>

										</div>
										<?php if($this->session->userdata('id_group') == ADMIN) { ?>
											<a id="auto_parameter_list_edit_<?php echo $param->id; ?>" href="javascript:showbox(<?php echo $param->id; ?>)" >
												<?php echo HTMLInput::image_tooltip("", _IMAGE_MODIFIER, IMAGE_SIZE_SMALL, _LB_EDIT); ?>
											</a>
										<?php } ?>
									</div>

									<div id="text_<?php echo $param->id; ?>" style="display:none">
										<input id="value_<?php echo $param->id; ?>" name="value_<?php echo $param->id; ?>" value="<?php if($param->type == PARAM_TYPE_RATE_NUMBER) { ?><?php echo HTMLOutput::format_price($param->value); ?><?php } else { ?><?php echo $param->value; ?><?php } ?>" type="text" size="10" />
										<a id="auto_parameter_list_validate_<?php echo $param->id; ?>" href="javascript:save_value(<?php echo $param->id; ?>,<?php echo $param->type; ?>);" >
											<?php echo HTMLInput::image_tooltip("", _IMAGE_DONE, IMAGE_SIZE_SMALL, _LB_VALIDATE); ?>
										</a>
										<a id="auto_parameter_list_cancel_<?php echo $param->id; ?>" href="javascript:hidebox(<?php echo $param->id; ?>);" >
											<?php echo HTMLInput::image_tooltip("", _IMAGE_SUPPRIMER, IMAGE_SIZE_SMALL, _LB_CANCEL); ?>
										</a>
									</div>
                                <?php } else if ( $param->type == PARAM_TYPE_TEXT_AREA_MANY_LINE) { ?>
								<div id="box_<?php echo $param->id; ?>" style="max-width:450px;">
									<div style="display:inline;max-width:425px;float:left;white-space: normal;word-wrap: break-word;" id="box_value_<?php echo $param->id; ?>"><?php echo $param->value; ?></div>
									<?php if($this->session->userdata('id_group') == ADMIN) { ?>
                                    <a id="auto_parameter_list_edit_<?php echo $param->id; ?>" href="javascript:showbox(<?php echo $param->id; ?>,<?php echo $param->type; ?>)" >
											<?php echo HTMLInput::image_tooltip("", _IMAGE_MODIFIER, IMAGE_SIZE_SMALL, _LB_EDIT); ?>
										</a>
									<?php } ?>
								</div>

								<div id="text_<?php echo $param->id; ?>" style="display:none">									
                                    <textarea rows="5" cols="50" id="value_<?php echo $param->id; ?>"  name="value_<?php echo $param->id; ?>"><?php echo $param->value; ?></textarea>
									<a id="auto_parameter_list_validate_<?php echo $param->id; ?>" href="javascript:save_value(<?php echo $param->id; ?>,<?php echo $param->type; ?>,'<?php echo $param->code; ?>');" >
										<?php echo HTMLInput::image_tooltip("", _IMAGE_DONE, IMAGE_SIZE_SMALL, _LB_VALIDATE); ?>
									</a>
									<a id="auto_parameter_list_cancel_<?php echo $param->id; ?>" href="javascript:hidebox(<?php echo $param->id; ?>,<?php echo $param->type; ?>);" >
										<?php echo HTMLInput::image_tooltip("", _IMAGE_SUPPRIMER, IMAGE_SIZE_SMALL, _LB_CANCEL); ?>
									</a>
								</div>
							<?php } else { ?>
								<div id="box_<?php echo $param->id; ?>" style="max-width:450px;">
									<div style="display:inline;max-width:425px;float:left;white-space: normal;word-wrap: break-word;" id="box_value_<?php echo $param->id; ?>"><?php echo $param->value; ?></div>
									<?php if($this->session->userdata('id_group') == ADMIN){ ?>
										<a id="auto_parameter_list_edit_<?php echo $param->id; ?>" href="javascript:showbox(<?php echo $param->id; ?>)" >
											<?php echo HTMLInput::image_tooltip("", _IMAGE_MODIFIER, IMAGE_SIZE_SMALL, _LB_EDIT); ?>
										</a>
									<?php } ?>
								</div>

								<div id="text_<?php echo $param->id; ?>" style="display:none">
									<input id="value_<?php echo $param->id; ?>" name="value_<?php echo $param->id; ?>" value="<?php echo $param->value; ?>" type="text" size="10" />
									<a id="auto_parameter_list_validate_<?php echo $param->id; ?>" href="javascript:save_value(<?php echo $param->id; ?>,<?php echo $param->type; ?>,'<?php echo $param->code; ?>');" >
										<?php echo HTMLInput::image_tooltip("", _IMAGE_DONE, IMAGE_SIZE_SMALL, _LB_VALIDATE); ?>
									</a>
									<a id="auto_parameter_list_cancel_<?php echo $param->id; ?>" href="javascript:hidebox(<?php echo $param->id; ?>);" >
										<?php echo HTMLInput::image_tooltip("", _IMAGE_SUPPRIMER, IMAGE_SIZE_SMALL, _LB_CANCEL); ?>
									</a>
								</div>
							<?php } ?>
						</div>
						<img class="small" src="<?php echo APPLICATION_URL; ?>/images/<?php echo IMAGE_NAME_PARAMETER_SMALL; ?>" alt="" />
						<?php echo $param->name; ?>
					</div>
					<div class="content">
						<?php echo _LB_DESCRIPTION; ?> : <?php echo $param->description; ?>
					</div>
				</div>
			<?php } ?>
			<?php } else { ?>
			    <?php echo _MSG_NO_EXISTING_PARAMETER; ?>
			<?php } ?>
		</div>
	</div>
<?php include("footer.php"); ?>
